package com.wmwsystems.inc.demo.wsserver;


import com.wmwsystems.service.flights.AirCompany;
import com.wmwsystems.service.flights.Status;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;

import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

@Component
public class FlightsRepository {

    private static final ArrayList<AirCompany> airCompanies = new ArrayList<AirCompany>();

    @PostConstruct
    public void initDate() {

        AirCompany pacificDreamlines = new AirCompany();
        pacificDreamlines.setIncID(1);
        pacificDreamlines.setName("Pacific Dreamlines");
        pacificDreamlines.setCode("PD");
        pacificDreamlines.setStatus(Status.ACTIVE);

        airCompanies.add(pacificDreamlines);
    }

    public Collection<AirCompany> getAirCompanies() {
        return airCompanies;
    }
}
